package com.oauth.google.client.ui.picasa;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Widget;
import com.oauth.google.client.beans.picassa.GooglePicasaModel;

public class HomePanel extends Composite {

	private static HomePanelUiBinder uiBinder = GWT
			.create(HomePanelUiBinder.class);

	interface HomePanelUiBinder extends UiBinder<Widget, HomePanel> {
	}

	@UiField
	HorizontalPanel splitPanel;

	@UiField
	AlbumList listBox;

	@UiField
	FlowPanel photoPanel;

	public HomePanel() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	public void setData(GooglePicasaModel pModel) {
		listBox.addAlbums(pModel.getAlbums());
	}

}
